<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="css/default.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/jquery-1.4.3.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery.validate.js" ></script>
        <script type="text/javascript">
             $(function(){
                 $('#nit').autocomplete({
                     source : 'ajax-form-emp.php',
                     select : function(event, ui){
                         $('#res').html(
                         '<h2>Resultado de la busqueda</h2>' +
                         '<strong>Nit: </strong>' + ui.item.value +'<br/>'+
                         '<strong>Nombre: </strong>' + ui.item.nombre +'<br/>'+
                         '<strong>Razon: </strong>' + ui.item.razon +'<br/>'+
                         '<strong>Tel: </strong>' + ui.item.telefono
                     );
                     }
                 });
             });
         </script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#form-contacto").validate();
            });
        </script>
        <style type="text/css">
            #commentForm { width: 500px; }
            #commentForm label { width: 250px; }
            #commentForm label.error, #commentForm input.submit { margin-left: 253px; }
        </style>

        <title>Nueva Empresa</title>
    </head>
    <!--body-->
    <body>
        <div id="wrapper">
            <?php include 'include/header.php'; ?>
            <!-- end div#header -->
            <div id="page">
                <div id="content">
                    <div id="welcome">
                        <h1>Diligencie el formulario con los datos de la empresa</h1>
                         <p><img src="images/warning.png" width="30" height="30">  Antes de diligenciar el formulario verifique el codigo de la empresa</p>
                        <div id="form-area">
                            <h2>Buscar empresa</h2>

                                    <dl>
                                        <dt><label for="nit">Escriba el nit de la empresa</label></dt>
                                        <dd><input type="text" name="nit" id="nit" /></dd>

                                        <dd><p id="res"></p> </dd>
                                    </dl>

                        </div>

                        <div id="form-area">
                            <h2>Registrar una nueva empresa</h2>
                            <form action="include/guardar-form-emp.php" method="post" id="form-contacto">
                                <fieldset>

                                    <dl>
                                        <dt><label for="nit1">Nit *</label></dt>
                                        <dd><input type="text" name="nit1" id="nit1" class="digits required" minlength="10" maxlength="30"/></dd>

                                        <dt><label for="nombre">Nombre *</label></dt>
                                        <dd><input type="text" name="nombre" id="nombre" class="required" minlength="2" maxlength="30"/></dd>

                                        
                                        <dt><label for="razon">Razon Social *</label></dt>
                                        <dd><input   name="razon" id="razon" class="required" minlength="5" maxlength="100"/></dd>

                                     
                                        <dt><label for="fijo">Telefono Fijo</label></dt>
                                        <dd><input type="text" name="fijo" id="fijo" class="digits" minlength="7" maxlength="7"/></dd>

                                      
                                        <dt><label for="dir">Direccion *</label></dt>
                                        <dd><input type="text" name="dir" id="dir" class="required" minlength="10"/></dd>

                                        <dt><label for="mun">Municipio *</label></dt>
                                        <dd><input type="text" name="mun" id="mun" class="required" minlength="5"/></dd>

                                        <dd><input type="hidden" name="estado" id="estado" value="1"/></dd>

                                      
                                        <dt class="center">
                                            <input type="submit" name="submit" id="submit" value="Enviar"/>
                                            <br></br>
                                            <input type="reset" name="button" id="button" value="Reset" />
                                        </dt>
                                    </dl>
                            </form>
                            </fieldset>

                        </div>

                    </div>

                    <!-- end div#welcome -->

                </div>
                <!-- end div#content -->
                <div id="sidebar">
                    <ul>
                        <?php include 'include/nav.php'; ?>

                        <!-- end navigation -->

                    </ul>
                </div>
                <!-- end div#sidebar -->
                <div style="clear: both; height: 1px"></div>
            </div>
            <?php include 'include/footer.php'; ?>
        </div>
        <!-- end div#wrapper -->
    </body>
    <!--body ends-->
</html>